<template>
  <div class="home">
    <div class="home-box">
      <AMap class="flex-left" style="width:100%; height: 100%;" @init="handleInitMap" ></AMap>
    </div>
  </div>
</template>
  
<script>
import MapWorld from '@/components/MapWorld/index.vue'
import AMap from '@/components/AMap/AMap.vue'
export default {
  name: 'HomeView',
  data() {
    return {
      id: '0',
    }
  },
  components: {
    MapWorld,
    AMap
  },
  methods: {
    handleInitMap(MapHandler) {
      
      const dataList = [
        {
          id: 1,
          jixin_disasiier_idd : 1,
          online_status:2,
          name:'测试',
          disaster_time:'2023-11-29 11:11:11',
          disaster_name:'disaster_name',
          battery:65,
          phone_number:1333333333,
          is_safe:true,
          longitude:106.4444,
          latitude:29.572389
        },
        {
          id: 2,
          jixin_disasiier_idd:2,
          online_status:1,
          name:'测试2',
          disaster_time:'2023-11-29 11:11:11',
          disaster_name:'disaster_name',
          battery:65,
          phone_number:1333333333,
          is_safe:true,
          longitude:106.555486,
          latitude:29.572389
        },
      ]
      MapHandler.addMarkers(dataList,1);
    },

  }
}
</script>
  